<!---Not in cfscript because I'm lazy and I copied from my other project--->
<cfcomponent output="true">

	<cfproperty name="PageTitle" type="string" />
	<cfproperty name="JSList" type="string" />
	<cfproperty name="CSSList" type="string" />
    <cfproperty name="PageContent" type="string" />
    <cfproperty name="JavaScriptFuncs" type="string" />
    <cfproperty name="TemplateColor" type="string" default="yellow" />
    <cfproperty name="SideBar" type="string" default="noSideBar" />
    
    <cffunction name="init" access="public" returntype="layout" output="false">
        <cfargument name="PageTitle" type="string" required="no" default="Template">
        <cfargument name="JSList" type="string" required="no" default="">
        <cfargument name="CSSList" type="string" required="no" default="">
        <cfargument name="PageContent" type="string" required="no" default="Hello World!">
        <cfargument name="JavaScriptFuncs" type="string" required="no" default="Hello World!">
        <cfargument name="TemplateColor" required="no" default="blue">
        <cfargument name="SideBar" required="no" default="noSideBar">
        <cfargument name="Options" required="no" default="Hello World!"><!---These will show in the sidebar.  Naming prevents me from calling this 'sidebar'--->
        
        
        <cfscript>
            setPageTitle(arguments.PageTitle);  
            setJSList(arguments.JSList);    
            setCSSList(arguments.CSSList); 
            setPageContent(arguments.PageContent);
            setJavaScriptFuncs(arguments.JavaScriptFuncs);
            setTemplateColor(arguments.TemplateColor);
            setSideBar(arguments.SideBar);
            setOptions(arguments.Options);
            return this;             
        </cfscript>
    </cffunction>
    
    
    <cffunction name="setOptions" access="public" output="false" returntype="void">
        <cfargument name="Options" type="string" required="true" />
        <cfset this.Options = arguments.Options />
        <cfreturn />
    </cffunction>
    
    <cffunction name="getOptions" access="public" output="false" returntype="string">
        <cfreturn this.Options />
    </cffunction>
    
    <cffunction name="setSideBar" access="public" output="false" returntype="void">
        <cfargument name="SideBar" type="string" required="true" />
        <cfset this.SideBar = arguments.SideBar />
        <cfreturn />
    </cffunction>
    
    <cffunction name="getSideBar" access="public" output="false" returntype="string">
        <cfreturn this.SideBar />
    </cffunction>
    
    <cffunction name="setJavaScriptFuncs" access="public" output="false" returntype="void">
        <cfargument name="JavaScriptFuncs" type="string" required="true" />
        <cfset this.JavaScriptFuncs = arguments.JavaScriptFuncs />
        <cfreturn />
    </cffunction>
    
    <cffunction name="getJavaScriptFuncs" access="public" output="false" returntype="string">
        <cfreturn this.JavaScriptFuncs />
    </cffunction>
    
    <cffunction name="setCSSLayout" access="public" output="false" returntype="void">
        <cfargument name="CSSLayout" type="string" required="true" />
        <cfset this.CSSLayout = arguments.CSSLayout />
        <cfreturn />
    </cffunction>
    
    <cffunction name="getCSSLayout" access="public" output="false" returntype="string">
        <cfreturn this.CSSLayout />
    </cffunction>
    
	<cffunction name="getPageTitle" access="public" output="false" returntype="string">
		<cfreturn this.PageTitle />
	</cffunction>

	<cffunction name="setPageTitle" access="public" output="false" returntype="void">
		<cfargument name="PageTitle" type="string" required="true" />
		<cfset this.PageTitle = arguments.PageTitle />
		<cfreturn />
	</cffunction>

	<cffunction name="getJSList" access="public" output="false" returntype="string">
		<cfreturn this.JSList />
	</cffunction>

	<cffunction name="setJSList" access="public" output="false" returntype="void">
		<cfargument name="JSList" type="string" required="true" />
		<cfset this.JSList = arguments.JSList />
		<cfreturn />
	</cffunction>

	<cffunction name="getCSSList" access="public" output="false" returntype="string">
		<cfreturn this.CSSList />
	</cffunction>

	<cffunction name="setCSSList" access="public" output="false" returntype="void">
		<cfargument name="CSSList" type="string" required="true" />
		<cfset this.CSSList = arguments.CSSList />
		<cfreturn />
	</cffunction>    
    
    <cffunction name="setPageContent" access="public" output="false" returntype="void">
        <cfargument name="PageContent" type="string" required="true" />
        <cfset this.PageContent = arguments.PageContent />
        <cfreturn />
    </cffunction>
    
    <cffunction name="getPageContent" access="public" output="false" returntype="string">
        <cfreturn this.PageContent />
    </cffunction>    
    
    <cffunction name="setTemplateColor" access="public" output="false" returntype="void">
        <cfargument name="TemplateColor" type="string" required="true" />
        <cfset this.TemplateColor = arguments.TemplateColor />
        <cfreturn />
    </cffunction>
    
    <cffunction name="getTemplateColor" access="public" output="false" returntype="string">
        <cfreturn this.TemplateColor />
    </cffunction>
    

	<cffunction name="html" access="public" output="true" returntype="Any">   
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><cfoutput>#this.PageTitle#</cfoutput></title>
        <meta name="keywords" content="" />
        <meta name="description" content="" />
        <meta content="no-cache" />
        
        <link href="/scfApps/css/scfAppsGeneral.css" rel="stylesheet" type="text/css" />
        <link href="/scfApps/css/scfApps.css" rel="stylesheet" type="text/css" />
        <link href="/scfApps/css/scfAppsBlue.css" rel="stylesheet" type="text/css" />
        <!---to change template color, add either scfAppsYellow.css, scfAppsBlue.css, or scfAppsGreen.css--->
        <link href="/SCFTemplateFramework/css/template.css" rel="stylesheet" type="text/css" />
        <cfif ListLen(this.CSSList) gt 0>
            <cfloop list="#this.CSSLIst#" index="css" delimiters=",">
                <link href="<cfoutput>#css#</cfoutput>" rel="stylesheet" type="text/css" />
            </cfloop>
        </cfif>
                
        <script language="Javascript" type="text/javascript" src="/jquery/jquery-1.4.2.min.js"></script>
        <cfif ListLen(this.JSList) gt 0>
            <cfloop list="#this.JSList#" index="js" delimiters=",">             
                <script language="Javascript" type="text/javascript" src="<cfoutput>#js#</cfoutput>" ></script>             
            </cfloop>
        </cfif>
             	
        <script language="Javascript" type="text/javascript">
            <cftry>
            	#this.JavaScriptFuncs()#            
            <cfcatch type="Any" >
            </cfcatch>
            </cftry>
        </script>
        
        <style>
            .hideme{display:none;}
            a.important{color:red}
        </style>     
        </head>              
        
        <body>
            <div id="outer">
                <div id="header">
                    <h1><span class="headerColor"><a href="/index.cfm">SCF</a></span> #APPLICATION.HeaderName#</h1>
                    <h2>#APPLICATION.version#</h2>
                </div>
                <div id="statusBar">
                    <div id="statusBarLeft">Welcome #ListGetAt(CGI.AUTH_USER, 2, '\')#</div>
                    <div id="statusBarRight"></div>
                </div>                    
                
                <!---New Header--->
                <div id="menu_wrapper" class="blue">
                <div class="left"></div>
                    <ul id="menu">
                        <li><a href="/#session.rootDir#/index.cfm">Home</a></li>
                        <li><a href="/#session.rootDir#/search.cfm">Search</a></li>
                        <li><a href="/#session.rootDir#/groups/">Groups</a></li>
                        <li><a href="/#session.rootDir#/users/">Users</a></li>
                        <li><a href="/#session.rootDir#/resources/">SCF Resources</a></li>
                        <li><a href="/#session.rootDir#/dashboard/">Dashboard</a></li>
                    </ul>
                </div>
                <!---New Header--->
                
                <cfset sideBarStruct = {
                    sideBarLeft = 'leftSidebar',
                    sideBarRight = 'rightSidebar',
                    noSideBar = 'noSidebar'
                } />
                
                <div id="content" style="margin-top: 10px;">
                    <cftry>
                        #this.Options()#            
                    <cfcatch type="Any" >
                        <cfset this.SideBar = 'noSideBar' />
                        <!---<div id="#this.SideBar#">
                            <h2>Options</h2>
                            <div id="sideBarLinks">
                                <a href="##">Edit</a>
                            </div>
                        </div>--->
                    </cfcatch>
                    </cftry>                    
                    
                    <div id="main" class="<cfoutput>#sideBarStruct[this.sideBar]#</cfoutput>">
                        <br />
                        #this.PageContent()#
                    </div>                    
                </div>
                <div id="footer">
                    <p id="legal">&copy;2007-#dateformat(now(),"YY")# Southcentral Foundation.</p>
                </div>
            </div>
        </body>
        </html>
        
        <cfreturn />
    </cffunction>
    
    
    
    <cffunction name="userLogin" access="public" output="true" returntype="any">
        <cfform name="loginForm" >            
            <cfoutput>
                <table class="dataTable">
                    <thead>
                        <tr>
                            <th>Login</th>
                            <th>Password</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr>
                            <td>#UCase(cgi.AUTH_USER)# <cfinput type="hidden" name="user_name" value="#cgi.AUTH_USER#"/></td>
                            <td><cfinput type="password" size="30" name="user_password" /></td>
                        </tr>
                    </tbody>
                </table>
                <cfinput class="btn" type="submit" value="Login" name="login">
            </cfoutput>
        </cfform>
    </cffunction>
    
    
</cfcomponent>